Skip to content

[backport camel-4.14.x] CAMEL-23581: camel-elasticsearch + camel-opensearch - align Exchange header constant names with Camel naming convention#23571

Merged
oscerd merged 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23442-to-camel-4.14.x
May 28, 2026
Merged

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 27, 2026

Backports #23442 to camel-4.14.x. Standard 4_21 → 4_14 guide-file adaptation. PARAM_* header values renamed to CamelElasticsearch* / CamelOpensearch* prefixes.

One conflict-resolution note: on 4.14.x the PARAM_SCROLL constant's @Metadata description is the simpler one-line "Set to true to enable scroll usage"; on main it was expanded to mention OpensearchScrollRequestIterator and resource leaks. The 4.14.x backport keeps the original 4.14.x description to avoid touching unrelated copy on the maintenance branch — only the value is renamed.

mvn test passes for both camel-elasticsearch and camel-opensearch on 4.14.x.

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

@oscerd oscerd force-pushed the backport/23442-to-camel-4.14.x branch 2 times, most recently from afd88fa to 00c1286 Compare May 28, 2026 09:21
…header constant names with Camel naming convention (apache#23442)

Renames the Exchange header string values in ElasticsearchConstants and
OpensearchConstants from non-Camel prefixed values (operation, indexId,
indexName, documentClass, waitForActiveShards, scrollKeepAliveMs,
useScroll, size, from, enableDocumentOnlyMode) to CamelElasticsearch* /
CamelOpensearch*, following the convention used across the rest of the
Camel component catalog and matching the pattern established in
CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail), CAMEL-23461
(camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket /
camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira).

The Java field names (PARAM_OPERATION, PARAM_INDEX_ID, PARAM_INDEX_NAME,
PARAM_DOCUMENT_CLASS, PARAM_WAIT_FOR_ACTIVE_SHARDS,
PARAM_SCROLL_KEEP_ALIVE_MS, PARAM_SCROLL, PARAM_SIZE, PARAM_FROM,
PARAM_DOCUMENT_MODE) are unchanged so routes referencing the constants
symbolically continue to work; routes using the literal string values
must be updated (documented in the 4.21 upgrade guide).

The already-Camel-prefixed PROPERTY_SCROLL_ES_QUERY_COUNT and
PROPERTY_SCROLL_OPENSEARCH_QUERY_COUNT constants are unchanged.

The generated Endpoint DSL header accessors on
ElasticsearchHeaderNameBuilder and OpensearchHeaderNameBuilder have been
renamed accordingly (operation() -> elasticsearchOperation() /
opensearchOperation(), indexId() -> elasticsearchIndexId() /
opensearchIndexId(), etc.).

All existing tests use symbolic constant references and continue to pass
without changes.

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd force-pushed the backport/23442-to-camel-4.14.x branch from 00c1286 to 800893e Compare May 28, 2026 15:03
@oscerd oscerd merged commit 468e421 into apache:camel-4.14.x May 28, 2026
3 checks passed
oscerd added a commit that referenced this pull request May 29, 2026
…n 4_14 upgrade guide (#23611)

The 4.14.x backport of CAMEL-23581 (PR #23571, merge commit 468e421)
landed without the corresponding `=== camel-elasticsearch / camel-opensearch
- potential breaking change` section in `camel-4x-upgrade-guide-4_14.adoc`,
because the cascade-rebase helper used to resolve the shared upgrade-guide
anchor extracted the section by heading and the helper's heading literal
used " + " as the component separator while the actual heading uses " / ".
The extractor produced a zero-line section and the merge therefore added
only a single blank line to the guide.

This commit reinstates the full 57-line section after the
`=== camel-web3j - potential breaking change` section and before the
`=== camel-google-functions / camel-google-secret-manager - potential
breaking change` section. The content is identical to what the original
backport PR carried before its final rebase and matches the equivalent
4.21 guide entry produced by main PR #23442.

No code changes are made by this commit — only documentation.

Tracker: CAMEL-23577

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants